<?php
include("startsess.php");
if($log){
?>
<script language="javascript" src="search_sent_ajax.js"></script>
<script language="javascript" src="ksean_ajax.js"></script>

<?php
	if(!isset($_POST['depart_id'])) $depart_idd = $_SESSION['edoc_depart_id'];
	else $depart_idd = $_POST['depart_id'];
?>

<?php
	if($_SESSION['edoc_read']!=0){
?>

<form action="search_result_sent.php" method="post">

<table cellpadding="5" cellspacing="0" border="0">
<tr><td class="topic">หน่วยงาน</td><td>:</td><td>
<?php
	list_department_userSsent($depart_idd); 
?>
</td></tr>
</table>

<table cellpadding="5" cellspacing="0" border="0">

<tr><td colspan="3">
<table cellpadding="5" cellspacing="0" border="0">
<tr><td colspan="6" class="topic">วันที่ส่ง</td></tr>
<tr><td>ตั้งแต่</td><td>:</td><td><input type="text" name="sent1" size="20" maxlength="450">
</td><td>&nbsp;&nbsp;&nbsp;ถึง</td><td>:</td><td>
<input type="text" name="sent2" size="20" maxlength="450"></td></tr>
</table>
</td></tr>

<tr><td colspan="3">
<table cellpadding="5" cellspacing="0" border="0">
<tr><td colspan="6" class="topic">วันที่หนังสือ</td></tr>
<tr><td>ตั้งแต่</td><td>:</td><td><input type="text" name="doc1" size="20" maxlength="450">
</td><td>&nbsp;&nbsp;&nbsp;ถึง</td><td>:</td><td>
<input type="text" name="doc2" size="20" maxlength="450"></td></tr>
</table>
</td></tr>

<tr><td class="topic">ชั้นความลับ</td><td>:</td><td>
<input type="checkbox" name="secret[]" value="0" checked>ปกติ &nbsp;&nbsp;&nbsp;
<input type="checkbox" name="secret[]" value="1" checked>ลับ &nbsp;&nbsp;&nbsp;
<input type="checkbox" name="secret[]" value="2" checked>ลับมาก &nbsp;&nbsp;&nbsp;
<input type="checkbox" name="secret[]" value="3" checked>ลับที่สุด
</td></tr>

<tr><td class="topic">ความเร่งด่วน</td><td>:</td><td>
<input type="checkbox" name="rapid[]" value="0" checked>ปกติ &nbsp;&nbsp;&nbsp;
<input type="checkbox" name="rapid[]" value="1" checked>ด่วน &nbsp;&nbsp;&nbsp;
<input type="checkbox" name="rapid[]" value="2" checked>ด่วนมาก &nbsp;&nbsp;&nbsp;
<input type="checkbox" name="rapid[]" value="3" checked>ด่วนที่สุด
</td></tr>

<tr><td class="topic">ประเภทหนังสือส่ง</td><td>:</td><td><span id="doctype_dat"> </span></td></tr>

<tr><td class="topic">เลขที่หนังสือ</td><td>:</td><td><input type="text" name="doc_no" size="50" maxlength="450"></td></tr>

<tr><td class="topic">เรื่อง</td><td>:</td><td><input type="text" name="headline" size="50" maxlength="450"></td></tr>

<tr><td class="topic">ผู้ส่ง</td><td>:</td><td><input type="text" name="sender" size="50" maxlength="450"></td></tr>

<tr><td class="topic">การปฏิบัติ</td><td>:</td><td><input type="text" name="commentdoc" size="50" maxlength="450"></td></tr>

<tr><td colspan="2"></td><td><input type="submit" name="search_doc" value=" ค้นหา "></td></tr>

</table>
</form>
<script>
doctypech()
</script>


<?php
	}else{
		echo "<span class=\"err\">คุณไม่สามารถค้นหาหนังสือได้</span><br />";
	}
?>

<?php
}
include("ft.php");
?>
